

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using JTC.MiniCommerce.Localization;
using JTC.MiniCommerce.Store;

namespace JTC.MiniCommerce.Web.controls.authentication {
  public partial class anonymoususer : System.Web.UI.UserControl {

    #region Page Events

    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
    protected void Page_Load(object sender, EventArgs e) {
      SetAnonymousUserProperties();
    }

    #endregion

    #region Methods

    #region Protected

    /// <summary>
    /// Gets the item count.
    /// </summary>
    /// <returns></returns>
    protected string GetItemCount() {
      int orderItemCount = new OrderController().GetItemCountInOrder(WebUtility.GetUserName());
      return orderItemCount.ToString();
    }

    #endregion

    #region Private

    /// <summary>
    /// Sets the anonymous user properties.
    /// </summary>
    private void SetAnonymousUserProperties() {
      lblAnonCart.Text = LocalizationUtility.GetText("lblCart");
      LocalizationUtility.AddHyperLinkText(hlLogin);
      LocalizationUtility.AddHyperLinkText(hlRegister);
    }

    #endregion

    #endregion

  }
}